﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModel.h"
#include "IExternalObject.h"
#include "NdbDataSchema.h"
#include "ElementId.h"
#include "IRevisionCloudType.h"

namespace gcmp
{
    class IDocument;

    struct RevisionCloudStyleData
    {
        std::wstring LoopStyle;          //云线样式
        std::wstring AnnotationTextStyle;  //注释字体样式
        std::wstring VersionTextStyle;  //版本字体样式
        std::wstring LeadWireStyle;      //引线样式
    };
    class GCMP_MODEL_EXPORT IRevisionCloudStyleManager : public IExternalObject
    {
        DECLARE_CLASS_WITHOUT_DATA_MEMBERS(gcmp, IRevisionCloudStyleManager, gcmp::IExternalObject, EB3CD1F4 - F5E7 - 35E6 - E7BC - 95F4421A129D, gcmpmodel)
    public:
        virtual ~IRevisionCloudStyleManager();

        /// \brief 获取云线样式管理实例
        /// \return 返回云线样式管理实例指针
        static IRevisionCloudStyleManager* Get(IDocument* pDoc);

        /// \brief 创建云线样式管理实例
        /// \return 返回云线样式管理实例指针
        static IRevisionCloudStyleManager*Create(IDocument* pDoc);


        virtual std::wstring GetCurrentStyleType() const = 0;
        virtual void SetCurrentStyleType(const std::wstring& strTypeName) = 0;
        
        virtual RevisionCloudStyleData GetStyleTypeData(const std::wstring& strTypeName) const = 0;
        virtual ElementId FindStyleType(const std::wstring& strTypName) const = 0;
        virtual void AddCloudStypeType(const ElementId& id) =0;
        virtual std::vector<ElementId> GetAllStyleType() const = 0;
        virtual std::vector<std::wstring> GetAllStyleTypeNames() const = 0;
        virtual void UpdateVersionStyle(const std::wstring& strStypeText) =0;
        virtual void UpdateAnnotationStype(const std::wstring& strStypeText)=0;
    };
}
